.class public Lcom/brixd/niceapp/model/TopicModel;
.super Ljava/lang/Object;
.source "TopicModel.java"

# interfaces
.implements Ljava/io/Serializable;


# static fields
.field private static final serialVersionUID:J = -0x5309ca96b69b4c78L


# instance fields
.field private category:I

.field private createTime:Ljava/lang/String;

.field private description:Ljava/lang/String;

.field private id:I

.field private image:Ljava/lang/String;

.field private publicationDate:Ljava/lang/String;

.field private title:Ljava/lang/String;

.field private updateTime:Ljava/lang/String;


# direct methods
.method public constructor <init>()V
    .registers 1

    .prologue
    .line 9
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method public static parseTopicModel(Lorg/json/JSONObject;)Lcom/brixd/niceapp/model/TopicModel;
    .registers 3
    .param p0, "jsonObj"    # Lorg/json/JSONObject;

    .prologue
    .line 91
    new-instance v0, Lcom/brixd/niceapp/model/TopicModel;

    invoke-direct {v0}, Lcom/brixd/niceapp/model/TopicModel;-><init>()V

    .line 92
    .local v0, "topicModel":Lcom/brixd/niceapp/model/TopicModel;
    const-string v1, "id"

    invoke-virtual {p0, v1}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;)I

    move-result v1

    invoke-virtual {v0, v1}, Lcom/brixd/niceapp/model/TopicModel;->setId(I)V

    .line 93
    const-string v1, "category"

    invoke-virtual {p0, v1}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;)I

    move-result v1

    invoke-virtual {v0, v1}, Lcom/brixd/niceapp/model/TopicModel;->setCategory(I)V

    .line 94
    const-string v1, "a_create_time"

    invoke-virtual {p0, v1}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/brixd/niceapp/model/TopicModel;->setCreateTime(Ljava/lang/String;)V

    .line 95
    const-string v1, "description"

    invoke-virtual {p0, v1}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/brixd/niceapp/model/TopicModel;->setDescription(Ljava/lang/String;)V

    .line 96
    const-string v1, "image"

    invoke-virtual {p0, v1}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/brixd/niceapp/model/TopicModel;->setImage(Ljava/lang/String;)V

    .line 97
    const-string v1, "publication_date"

    invoke-virtual {p0, v1}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/brixd/niceapp/model/TopicModel;->setPublicationDate(Ljava/lang/String;)V

    .line 98
    const-string v1, "title"

    invoke-virtual {p0, v1}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/brixd/niceapp/model/TopicModel;->setTitle(Ljava/lang/String;)V

    .line 99
    const-string v1, "a_update_time"

    invoke-virtual {p0, v1}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/brixd/niceapp/model/TopicModel;->setUpdateTime(Ljava/lang/String;)V

    .line 100
    return-object v0
.end method

.method public static parseTopicModels(Lorg/json/JSONObject;)Ljava/util/ArrayList;
    .registers 6
    .param p0, "jsonObj"    # Lorg/json/JSONObject;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lorg/json/JSONObject;",
            ")",
            "Ljava/util/ArrayList",
            "<",
            "Lcom/brixd/niceapp/model/TopicModel;",
            ">;"
        }
    .end annotation

    .prologue
    .line 81
    new-instance v3, Ljava/util/ArrayList;

    invoke-direct {v3}, Ljava/util/ArrayList;-><init>()V

    .line 82
    .local v3, "topicModels":Ljava/util/ArrayList;, "Ljava/util/ArrayList<Lcom/brixd/niceapp/model/TopicModel;>;"
    const-string v4, "apps"

    invoke-virtual {p0, v4}, Lorg/json/JSONObject;->optJSONArray(Ljava/lang/String;)Lorg/json/JSONArray;

    move-result-object v1

    .line 83
    .local v1, "jsonArray":Lorg/json/JSONArray;
    const/4 v0, 0x0

    .local v0, "i":I
    :goto_c
    invoke-virtual {v1}, Lorg/json/JSONArray;->length()I

    move-result v4

    if-ge v0, v4, :cond_20

    .line 84
    invoke-virtual {v1, v0}, Lorg/json/JSONArray;->optJSONObject(I)Lorg/json/JSONObject;

    move-result-object v4

    invoke-static {v4}, Lcom/brixd/niceapp/model/TopicModel;->parseTopicModel(Lorg/json/JSONObject;)Lcom/brixd/niceapp/model/TopicModel;

    move-result-object v2

    .line 85
    .local v2, "topicModel":Lcom/brixd/niceapp/model/TopicModel;
    invoke-virtual {v3, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 83
    add-int/lit8 v0, v0, 0x1

    goto :goto_c

    .line 87
    .end local v2    # "topicModel":Lcom/brixd/niceapp/model/TopicModel;
    :cond_20
    return-object v3
.end method


# virtual methods
.method public getCategory()I
    .registers 2

    .prologue
    .line 25
    iget v0, p0, Lcom/brixd/niceapp/model/TopicModel;->category:I

    return v0
.end method

.method public getCreateTime()Ljava/lang/String;
    .registers 2

    .prologue
    .line 65
    iget-object v0, p0, Lcom/brixd/niceapp/model/TopicModel;->createTime:Ljava/lang/String;

    return-object v0
.end method

.method public getDescription()Ljava/lang/String;
    .registers 2

    .prologue
    .line 33
    iget-object v0, p0, Lcom/brixd/niceapp/model/TopicModel;->description:Ljava/lang/String;

    return-object v0
.end method

.method public getId()I
    .registers 2

    .prologue
    .line 17
    iget v0, p0, Lcom/brixd/niceapp/model/TopicModel;->id:I

    return v0
.end method

.method public getImage()Ljava/lang/String;
    .registers 2

    .prologue
    .line 49
    iget-object v0, p0, Lcom/brixd/niceapp/model/TopicModel;->image:Ljava/lang/String;

    return-object v0
.end method

.method public getPublicationDate()Ljava/lang/String;
    .registers 2

    .prologue
    .line 73
    iget-object v0, p0, Lcom/brixd/niceapp/model/TopicModel;->publicationDate:Ljava/lang/String;

    return-object v0
.end method

.method public getTitle()Ljava/lang/String;
    .registers 2

    .prologue
    .line 41
    iget-object v0, p0, Lcom/brixd/niceapp/model/TopicModel;->title:Ljava/lang/String;

    return-object v0
.end method

.method public getUpdateTime()Ljava/lang/String;
    .registers 2

    .prologue
    .line 57
    iget-object v0, p0, Lcom/brixd/niceapp/model/TopicModel;->updateTime:Ljava/lang/String;

    return-object v0
.end method

.method public setCategory(I)V
    .registers 2
    .param p1, "category"    # I

    .prologue
    .line 29
    iput p1, p0, Lcom/brixd/niceapp/model/TopicModel;->category:I

    .line 30
    return-void
.end method

.method public setCreateTime(Ljava/lang/String;)V
    .registers 2
    .param p1, "createTime"    # Ljava/lang/String;

    .prologue
    .line 69
    iput-object p1, p0, Lcom/brixd/niceapp/model/TopicModel;->createTime:Ljava/lang/String;

    .line 70
    return-void
.end method

.method public setDescription(Ljava/lang/String;)V
    .registers 2
    .param p1, "description"    # Ljava/lang/String;

    .prologue
    .line 37
    iput-object p1, p0, Lcom/brixd/niceapp/model/TopicModel;->description:Ljava/lang/String;

    .line 38
    return-void
.end method

.method public setId(I)V
    .registers 2
    .param p1, "id"    # I

    .prologue
    .line 21
    iput p1, p0, Lcom/brixd/niceapp/model/TopicModel;->id:I

    .line 22
    return-void
.end method

.method public setImage(Ljava/lang/String;)V
    .registers 2
    .param p1, "image"    # Ljava/lang/String;

    .prologue
    .line 53
    iput-object p1, p0, Lcom/brixd/niceapp/model/TopicModel;->image:Ljava/lang/String;

    .line 54
    return-void
.end method

.method public setPublicationDate(Ljava/lang/String;)V
    .registers 2
    .param p1, "publicationDate"    # Ljava/lang/String;

    .prologue
    .line 77
    iput-object p1, p0, Lcom/brixd/niceapp/model/TopicModel;->publicationDate:Ljava/lang/String;

    .line 78
    return-void
.end method

.method public setTitle(Ljava/lang/String;)V
    .registers 2
    .param p1, "title"    # Ljava/lang/String;

    .prologue
    .line 45
    iput-object p1, p0, Lcom/brixd/niceapp/model/TopicModel;->title:Ljava/lang/String;

    .line 46
    return-void
.end method

.method public setUpdateTime(Ljava/lang/String;)V
    .registers 2
    .param p1, "updateTime"    # Ljava/lang/String;

    .prologue
    .line 61
    iput-object p1, p0, Lcom/brixd/niceapp/model/TopicModel;->updateTime:Ljava/lang/String;

    .line 62
    return-void
.end method
